[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
vc
, the frontend for vbcc. It knows how
to deal with different file types and optimization settings and will
call the compiler, assembler and linker.
It is not recommended to call the different translation-phases directly.
vc
provides an easy-to-use interface which is mostly compatible to
Unix cc
.
The general syntax for calling vc
|
processes all files according to their suffix and links all objects together (unless any of `-E', `-S', `-c' is specified). The following file types are recognized:
Usually pattern matching is supported - however this depends on the port and the host system.
The options recognized by vc
are:
Also, -O3 will activate cross-module-optimizations. All source files specified on the command line will be passed to the compiler at once. Only one assembly/object-file will be produced (by default the name is the name of the first source file with corresponding suffix).
When compiling with -O4 and -c vbcc will not produce real object files but special files containing all necessary information to defer optimization and code-generation to link-time. This is useful to provide all files of a project to the optimizer and make full use of cross-module optimizations. Note that you must use vc to do the linking. vc will detect and handle these files correctly. They can not be linked directly. Also, make sure to pass all relevant compiler options also to the linker-command.
Higher values may or may not activate even more optimizations. The default is -O=1. It is also possible to specify an exact value with -O=n. However, I do not recommend this unless you know exactly what you are doing.
#define
a preprocessor symbol, e.g. -DAMIGA or -DCPU=68000.
The former syntax is equivalent to:
#define AMIGA 1 |
#define CPU 68000 |
All other options are passed through to vbcc
.
vc
needs a config file to know how to call all the translation
phases (compiler, assembler, linker). Unless a different file is
specified using the `+'-option, it will look for a file
`vc.config' (`vc.cfg' for DOS/Windows).
On AmigaOS vc
will search in the current
directory, in `ENV:' and `VBCC:'.
On Unix vc
will search in the current directory followed
by `/etc/'.
On DOS/Windows it will search in the current directory.
If the config file was not found in the default search-paths and
an environment variable $VBCC
is set, vc
will also look
in $VBCC
`/config'.
Once a config file is found, it will be treated as a collection of additional command line arguments. Every line of the file will be used as one argument. So no quoting shall be used and furthermore must each argument be placed on its own line.
The following options can be used to tell vc
how to call the
translation phases (they will usually be contained in the config-file):
printf(string,opts,infile,outfile)
, e.g. the default for vcpp
searching the includes in `vinclude:' and defining __STDC__
)
is `-pp=vcpp -Ivinclude: -D__STDC__=1 %s %s %s'
vc
to call
another compiler than vbcc
. But you can call different
versions of vbcc
this way, e.g.:
`-cc=vbcca68k -quiet' or
`-cc=vbcci386 -quiet'
All those strings should tell the command to omit any output apart from error messages if possible. However for every of those options there exists one with an additional `v', i.e. `-ppv=', `-asv=', etc. which should produce some output, if possible. If vc is invoked with the `-vv' option the verbose commands will be called, if not the quiet ones will be used.
printf(string,lib)
will be added to the
command invoking the linker. Examples are:
`-ul=vlib:%s.lib' or `-ul=-l%s'
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |